import java.util.concurrent.TimeUnit;

/**
 * @Author zqc
 * @Date 2021/1/25 09:58
 * @Description
 */
public class WhatIsThread {
    private static class T1 extends Thread {
        @Override
        public void run() {
            for(int i=0; i<10; i++) {
                try {
                    TimeUnit.MICROSECONDS.sleep(1);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
                System.out.println("T1: "+i);
            }
        }
    }

    public static void main(String[] args) {
        //new T1().run();			//类似调用普通run方法
        new T1().start();			//调用线程run
        for(int i=0; i<10; i++) {
            try {
                TimeUnit.MICROSECONDS.sleep(1);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            System.out.println("main: "+i);
        }

    }
}